﻿<%@page import="weaver.general.Util"%>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> 
<%@ include file="/systeminfo/init_wev8.jsp" %> 
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<%
	int requestid = Util.getIntValue(request.getParameter("requestid"),0);//请求id
	int workflowid = Util.getIntValue(request.getParameter("workflowid"));//流程id
	int formid = Util.getIntValue(request.getParameter("formid"));//表单id
	int isbill = Util.getIntValue(request.getParameter("isbill"));//表单类型，1单据，0表单
	int nodeid = Util.getIntValue(request.getParameter("nodeid"));//流程的节点id
	int scoreid = Util.getIntValue(request.getParameter("scoreid"));//scoreid
	
	//获取工单页面传过来的参数
	String gdbh = Util.null2String(request.getParameter("gdbh"));//工单编号
	String xmmc = Util.null2String(request.getParameter("xmmc"));//项目名称
	String pxbm = Util.null2String(request.getParameter("pxbm"));//品项编码
	String sjyq = Util.null2String(request.getParameter("sjyq"));//设计要求
	String gg = Util.null2String(request.getParameter("gg"));//规格
	String czyq = Util.null2String(request.getParameter("czyq"));//材质要求
	String dw = Util.null2String(request.getParameter("dw"));//单位
	String AEbj = Util.null2String(request.getParameter("AEbj"));//AE报价
	String bzyq = Util.null2String(request.getParameter("bzyq"));//包装要求
	String jhsj = Util.null2String(request.getParameter("jhsj"));//交货时间
	double sl = Util.getDoubleValue(request.getParameter("sl"));//数量
	String bm = "";
	RecordSet recordSet = new RecordSet();
	if(pxbm != ""){
		String sql = "select * from uf_kcbd where id="+pxbm;	
		recordSet.execute(sql);
		recordSet.next();
		bm = Util.null2String(recordSet.getString("pxbm"));
	}
	
%>

<script type="text/javascript">
jQuery(document).ready(function(){
	var xmmc = "<%=xmmc%>";
	var bm = "<%=bm%>";
	var sjyq = "<%=sjyq%>";
	var gg = "<%=gg%>";
	var czyq = "<%=czyq%>";
	var dw = "<%=dw%>";
	var AEbj = "<%=AEbj%>";
	var bzyq = "<%=bzyq%>";
	var jhsj = "<%=jhsj%>";
	var sl = "<%=sl%>"; 
	var gdbh = "<%=gdbh%>";
	
	//console.log("项目名称："+xmmc+"--品相编码："+bm+"--设计要求："+sjyq+"--规格："+gg+"--材质要求："+czyq+"--单位："+dw+"--AE报价："+AEbj+"包装要求："+bzyq+"交货时间："+jhsj);
 	var field6063 = "field6063";//工单编号
	var field6094 = "field6094";//品相编码
	var field6065 = "field6065";//物料名称
	var field6066 = "field6066";//材质要求
	var field6075 = "field6075";//规格
	var field6069 = "field6069";//数量
	var field6081 = "field6081";//单位
	var field6073 = "field6073";//包装要求
	var field6074 = "field6074";//交货时间
	//工单编号
	if(gdbh != ""){
		jQuery("#"+field6063).val(gdbh);
		jQuery("#"+field6063+"span").html(gdbh);
	}
	//物料名称
	if(xmmc != ""){
		jQuery("#"+field6065).val(xmmc);
		jQuery("#"+field6065+"span").html(xmmc);
	}
	//品相编码
	if(bm != ""){
		jQuery("#"+field6094).val(bm);
		jQuery("#"+field6094+"span").html(bm);
	}
	//材质要求
	if(czyq != ""){
		jQuery("#"+field6066).val(czyq);
		jQuery("#"+field6066+"span").html(czyq);
	}
	//规格
	if(gg != ""){
		jQuery("#"+field6075).val(gg);
		jQuery("#"+field6075+"span").html(gg);
	}
	//数量
	if(sl != -1){
		jQuery("#"+field6069).val(sl);
	}
	//单位
	if(dw != ""){
		jQuery("#"+field6081).val(dw);
		jQuery("#"+field6081+"span").html(dw);
	}
	//包装要求
	if(bzyq != ""){
		jQuery("#"+field6073).val(bzyq);
		jQuery("#"+field6073+"span").html(bzyq);
	}
	//交货时间
	if(jhsj != ""){
		jQuery("#"+field6074).val(jhsj);
		jQuery("#"+field6074+"span").html(jhsj); 
	}
});
</script>
